//
//  HBShakeResultJXCell.m
//  HuoBao
//
//  Created by chaiyanan on 15/12/10.
//  Copyright © 2015年 jinxin. All rights reserved.
//

#import "HBShakeResultJXCell.h"

@interface HBShakeResultJXCell ()

@property (nonatomic, strong) UILabel *titleLable;
@property (nonatomic, strong) UIImageView *arrowImageView;

@end

@implementation HBShakeResultJXCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self)
    {
        self.backgroundColor = [UIColor clearColor];
        [self createCustomView];
    }
    return self;
}

- (void)createCustomView
{
    
    self.titleLable = [[UILabel alloc]initWithFrame:CGRectMake(15, 0, SCREEN_WIDTH-2*15, Height_HBShakeResultJXCell)];
    self.titleLable.font = [UIFont systemFontOfSize:16.0f];
    self.titleLable.textColor = [LCCommon getColor:@"ffffff"];
    self.titleLable.textAlignment = NSTextAlignmentLeft;
    self.titleLable.text = @"加息记录";
    
    UIImage *image = [UIImage imageNamed:@"income_zhaiquan"];
    self.arrowImageView = [[UIImageView alloc]initWithImage:image];
    self.arrowImageView.frame = CGRectMake(SCREEN_WIDTH-15-image.size.width, (Height_HBShakeResultJXCell-image.size.height)/2, image.size.width, image.size.height);
    
    [self.contentView addSubview:self.titleLable];
    [self.contentView addSubview:self.arrowImageView];
    
     [self createSepratorLineWithFrame:CGRectMake(15, Height_HBShakeResultJXCell-1-1/([UIScreen mainScreen].scale), SCREEN_WIDTH-30, 1/([UIScreen mainScreen].scale)) backgroundColor:[LCCommon getColor:@"585858"] superView:self.contentView];
}

- (UIView *)createSepratorLineWithFrame:(CGRect)frame backgroundColor:(UIColor *)bgColor superView:(UIView *)superView
{
    UIView *sepratorLine = [[UIView alloc]initWithFrame:frame];
    sepratorLine.backgroundColor = bgColor;
    [superView addSubview:sepratorLine];
    return sepratorLine;
}


@end
